import * as THREE from "three";

const meshCount = 192;

function planeCreate() {
  return new THREE.PlaneGeometry(10, 10, 1, meshCount)
}
function sphereCreate() {
  return new THREE.IcosahedronGeometry( 1, meshCount / 3 );
}
function waterCreate() {
  return new THREE.PlaneGeometry(10, 10, meshCount, meshCount)
}


export function createGeometry(type) {
  const createrMap = {
    plane: planeCreate,
    sphere: sphereCreate,
    waterPlane: waterCreate
  }
  const creater = createrMap[type];
  return creater();
}
